home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Pascal Super Library
/
Pascal Super Library (CW International)(1997).bin
/
SECURITY
/
MNGLR140
/
READ.ME
< prev
next >
Wrap
Text File
|
1996-05-01
|
6KB
|
172 lines
Program : Mangler
Version : 1.36
Release date: 1996 apr 17
Written by: Berend de Boer, write to
compuserve: 100120,3121
email : 100120.3121@compuserve.com
fidonet : 2:281/527.23
fax : +31 (0)418-562593
Copyright : (c) Copyright 1993-1996 by Berend de Boer
What this program does
~~~~~~~~~~~~~~~~~~~~~~
This program mangles the Turbo Pascal source code for a unit so it will
be unreadable (or very hard) for humans. The compiler should still be
able to compile it without any problems or lost functionality. The
program does so by:
1. converting all non-exported symbols to a random combination of 'O',
'I', '1', 'l' and '0'.
2. Removing most white space
3. Removing all comments
4. Packing as many pascal code on a given line as possible
This program can compile the vast majority of units (including units
that use BASM or inline code), a few special cases are not catered for.
See BUGS.TXT for units this program can't compile. If you have a unit
that mangler cannot compile, please write me.
The output of mangler consists of:
- the interface section of the mangled unit, just as it appears in your
code, so without *any* modification
- the mangled implementation section
Where is it good for
~~~~~~~~~~~~~~~~~~~~
o if you are tired of having to supply hunders of .tp?'s with your
package
o if you want users which changed interface sections of the rtl to
compile your units too
o if you have source code that you want to release as shareware and only
registered user's should have the real source
o if only mangled source may be released due to copyrights conflicts
that could possibly otherwise arise
o to test pascal source code beautifiers.
How to use this program
~~~~~~~~~~~~~~~~~~~~~~~
Simply saying
MANGLER MYFILE.PAS MYFILE.OUT
will mangler the file myfile.pas to myfile.out.
Wildcards are supported also, so you can type
MANGLER *.PAS *.OUT
too.
See TEST.PAS and TEST.OUT for a sample of an unmangled and mangled unit.
License
~~~~~~~
See LICENSE.TXT for details.
The cost of this program
~~~~~~~~~~~~~~~~~~~~~~~~
This program is free for public domain or shareware packages. Commercial
firms should write me for the cost of the program. Mangler's cost
depends on your size and how many packages you are selling.
Bugs
~~~~
This product is *NOT* bugfree. For more details see BUGS.TXT.
The source code
~~~~~~~~~~~~~~~
The complete source code for mangler is provided with this package. It
is MANGLER.L and ASMLEX.L. You need the Lex program from Albert Graef,
version 3.0 or higher to convert these lex programs to Turbo Pascal
before you can compile them. You also need TP7 or BP7. This program
compiles and runs both under real and protected mode.
The Lex program from Albert Graef can probably be found on
garbo.uwasa.fi in the /pc/turbopas/ directory. It should be called
tply.zip (or so) for the program and tplysrc.zip (or so) for the source.
Acknowledgements
~~~~~~~~~~~~~~~~
Foremost thanks to Albert Graef for his excellent Lex (and Yacc)
package. Without it it is impossible to write a mangler is my firm
belief.
I would like to acknowledge Scott Dudley for the license provided with
his Squish program which I've used for Mangler. Scott Dudley himself
acknowlegde Richard Stallman of the Free Software Foundation for most of
the wording of that license.
I would like to thank Prof. Timo Salmi from the University of Vaasa,
Finland, also of his suggestions and effort to run mangler on his
well known collection of pascal routines. He also suggested many
improvements.
Also thanks to Julian Bucknall [100116,1572] of TurboPower, who send
me some really nasty bugs which kept me busy for hours :-)
History
~~~~~~~
93-03-30 Release 1.00
93-04-19 Release 1.10
- reported bugs fixed (see also MANGLER.L)
- added ampersand override recognizing
93-07-19 Release 1.13
- splitted MANGLER.L into MANGLER.PAS and PASLEX.L
- fixed bugs reported by Richard Hansen
93-09-29 Release 1.14
- fixed the procedure type bug
93-11-08 Release 1.15
- bugs reported by Timo Salmi
- real numbers were not handled correctly
93-11-19 Release 1.20
- interface not mangled anymore
- label statements were not parsed correctly, reported by
Timo Salmi.
93-11-24 Release 1.21
- when source and destination file are the same this is now
detected. Sucn files are skipped.
- not all files opened were closed (oops!).
- crunching part changed a bit. Tpc choked on #10 ended
lines.
93-11-25 Release 1.22
- variant records broke Mangler
93-12-11 Release 1.23
- bugs fixed.
94-01-22 Release 1.30
- mangler now parses the interface to be able to correctly
mangle complex variables. It should now be able to mangle
almost all source.
It seems great, but it isn't fully tested yet. Be warned!
94-03-21 Release 1.31
- bugs reported by Julian Bucknall [100116,1572]
- variant records were not recognized
- procedure types in the implementation section broke mangler
94-04-01 Release 1.32
- variant records were still not parsed correctly
- array subscription in between with .. do was not recognized
- some other bugs were removed or I removed simply bugs I
created when updating mangler for the above errors
94-10-10 Release 1.33
- fixed bug involving constant arrays
- Scopes defined in a certain function were not removed after
the function ended. For very specific cases this caused
a quite strange bug to occur. Mangler now uses less memory
also.
94-10-22 Release 1.34
- fixed bug introduced in 1.33
94-10-25 Release 1.35
- enumerated types in records were not corectly handled
96-04-18 Release 1.40
- handles type casts better
- handles forward pointers
- handles pointer derefences better
This means the bugs.txt list has shrunk somewhat!